package com.bf.electroplating.controller;


import com.bf.electroplating.pojo.vo.ResultVO;
import com.bf.electroplating.pojo.vo.SelectVo;
import com.bf.electroplating.service.PubParamDictionaryService;
import io.swagger.v3.oas.annotations.Operation;
import io.swagger.v3.oas.annotations.tags.Tag;
import jakarta.annotation.Resource;
import lombok.Setter;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.RestController;

import java.util.List;

/**
 * <p>
 * (参数字典表)PUB_PARAM_DICTIONARY 前端控制器
 * </p>
 *
 * @author xxx
 * @since 2024-10-18
 */
@RestController
@RequestMapping("/pub-param-dictionary")
@Tag(name = "参数字典", description = "参数字典")
@Setter ( onMethod_ = @Resource)
public class PubParamDictionaryController {

	private PubParamDictionaryService pubParamDictionaryService;

	@GetMapping ( "/getParamList" )
	@Operation( summary = "参数下拉", description = "参数下拉" )
	public ResultVO< List <SelectVo> > getParamList(@RequestParam String moudle ) {
		return pubParamDictionaryService.getParamList( moudle );
	}

	@GetMapping ( "/getParamListByMn" )
	@Operation( summary = "根据mn码获取数据", description = "根据mn码获取数据" )
	public ResultVO< List <SelectVo> > getParamListByMn(@RequestParam String mn , @RequestParam String moudle ) {
		return pubParamDictionaryService.getParamListByMn( mn , moudle);
	}


}
